package main


import (
    "fmt"
)


type arr[2][2] int


func (t * arr) Print() {
    for _, row := range t {
        for _, number := range row {
            fmt.Printf("%2d ", number)
        }
        fmt.Println()
    }
}


func main(){
    // var arr[2][2] int
    
    t := arr{{22,11},{11,11}}

    fmt.Println("二维数组的定义")
    t.Print()

    fmt.Println("定义一维数组")

    var arr2 = [2] int {1,2}
    fmt.Printf("%2d ", arr2[1])
    fmt.Println()    
}

